package Teste;

import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class InitialTest extends JFrame {

	private static final long serialVersionUID = 2L;
	private JPanel contentPane;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					InitialTest frame = new InitialTest();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public InitialTest() {
		setTitle("Occurence Safe - Initial Test");
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		Dimension tela = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension tela1 = getSize();
		setLocation((tela.width - tela1.width)/2, (tela.height-tela1.height)/2);
		
		JButton btnMysql = new JButton("MySQL");
		btnMysql.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				SecondTest Tela1 = new SecondTest();
				Tela1.setVisible(true);
				dispose();
			}
		});
		btnMysql.setBounds(170, 92, 89, 23);
		contentPane.add(btnMysql);
		
		JButton btnArraylist = new JButton("ArrayList");
		btnArraylist.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Options Tela2 = new Options();
				Tela2.setVisible(true);
				dispose();
			}
		});
		btnArraylist.setBounds(170, 162, 89, 23);
		contentPane.add(btnArraylist);
		
		JLabel label = new JLabel("Occurence Safe");
		label.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 27));
		label.setBounds(10, 11, 194, 32);
		contentPane.add(label);
	}
}
